home *** CD-ROM | disk | FTP | other *** search
- /* movedata.c - moves specified number of bytes */
- #include "stdio.h"
-
- int movedata(to,from,nbytes)
- char *to ; /* move the data to here */
- char *from ; /* move it from here */
- int nbytes ; /* number of bytes to move */
- {
- while( nbytes > 0 ) /* stop when all bytes are moved */
- { *to = *from ; /* move a byte */
- to = to + 1 ; /* advance pointers to and from */
- from = from + 1 ;
- nbytes = nbytes - 1 ;/* reduce bytes left */
- }
- }
-
-